import request from '@/utils/request'

// 查询卤味订单列表
export function listOrder(query) {
  return request({
    url: '/system/order/orderDetail',
    method: 'get',
    params: query
  })
}

// 查询卤味订单详细
export function getOrder(id) {
  return request({
    url: '/system/order/' + id,
    method: 'get'
  })
}

// 新增卤味订单
export function addOrder(data) {
  return request({
    url: '/system/order',
    method: 'post',
    data: data
  })
}

// 修改卤味订单
export function updateOrder(data) {
  return request({
    url: '/system/order',
    method: 'put',
    data: data
  })
}

// 删除卤味订单
export function delOrder(id) {
  return request({
    url: '/system/order/' + id,
    method: 'delete'
  })
}

// 核销订单
export function orderVerification(orderId) {
  return request({
    url: '/system/order/orderVerification',
    method: 'get',
    params: {
      orderId: orderId
    }
  })
}
//获取部门
  export function getDept() {
    return request({
      url: '/system/dept/list',
      method: 'get'
    })
  }
//批量核销
export function batchVerification(orderIds) {
  return request({
    url: '/system/order/batchVerification',
    method: 'post',
    data: orderIds
  })
}
